from flask import Flask, render_template,jsonify

app = Flask(__name__)
@app.route('/')
def index1():
    # 返回字符串，支持html标签
    # return '<b>flask 1</b>'
    #    1. 模版渲染
    return render_template('index.html',name="张三")
    # 2. 返回json数据
    # return {'name':'张三','age':18}
    # return jsonify({'name':'张三','age':18})
@app.route('/hello')
def index2():
    return '<b>flask 2</b>'
if __name__ == '__main__':
    app.run(debug=True)